#include<bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long n,m,x;
    cin>>n>>m>>x;
    cout<<(x/m+(x%m!=0))<<' '<<(x%m+((x%m==0)*m))<<endl;
    return 0;
}